home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / prolog / sbprolog / v3 / modlib_s.lha / modlib_src / $prorc.P < prev    next >
Text File  |  1990-04-12  |  9KB  |  222 lines

  1. /************************************************************************
  2. *                                    *
  3. * The SB-Prolog System                            *
  4. * Copyright SUNY at Stony Brook, 1986; University of Arizona, 1987    *
  5. *                                    *
  6. ************************************************************************/
  7.  
  8. /*-----------------------------------------------------------------
  9. SB-Prolog is distributed in the hope that it will be useful,
  10. but WITHOUT ANY WARRANTY.  No author or distributor
  11. accepts responsibility to anyone for the consequences of using it
  12. or for whether it serves any particular purpose or works at all,
  13. unless he says so in writing.  Refer to the SB-Prolog General Public
  14. License for full details.
  15.  
  16. Everyone is granted permission to copy, modify and redistribute
  17. SB-Prolog, but only under the conditions described in the
  18. SB-Prolog General Public License.   A copy of this license is
  19. supposed to have been given to you along with SB-Prolog so you
  20. can know your rights and responsibilities.  It should be in a
  21. file named COPYING.  Among other things, the copyright notice
  22. and this notice must be preserved on all copies. 
  23. ------------------------------------------------------------------ */
  24. /* $prorc.P */
  25.  
  26. /* This file is called when $readloop is initializing the system.
  27.    It gives the user a chance to set up the defined_mods/2 predicate
  28.    so that the standard system (or some other) predicates will be
  29.    automatically loaded on need. 
  30.    Use $define_mod(Modname,Implist) to specify default loading of Modname
  31.    when a predicate in Implist is invoked. Implist must correspond to
  32.    the export list of Modname.
  33. */
  34.  
  35. $prorc :- $prorc_bio,$prorc_io,$prorc_assert,$prorc_bmeta,$prorc_meta,
  36.     $prorc_name,$prorc_read,$prorc_inlines,$prorc_osys,$prorc_glob,
  37.     $prorc_compare,$prorc_deb,$prorc_retr,$prorc_consult,$prorc_buff,
  38.     $prorc_defint,$prorc_setof,$prorc_db,$prorc_compile,$prorc_mod,
  39.     $prorc_prag,$prorc_blist,$prorc_listutil1,$prorc_mac, $prorc_et,
  40.     $prorc_arith, $prorc_prof, $prorc_stat, $prorc_dcg, $prorc_portray,
  41.     $prorc_decompile, $prorc_record, $prorc_currsyms, $prorc_opcode,
  42.     $prorc_funrel.
  43.  
  44. /* $prorc_init_sys :-
  45.     $define_mod('$init_sys',[define_mod/2,load/1,$load_mod/1]),
  46.     $define_mod('$init_sys',[$define_mod/2,$load/1,$load_mod/1]), */
  47.  
  48. $prorc_bio :-
  49.     $define_mod($bio,[writename/1,writeqname/1,put/1,nl/0,tab/1,
  50.         tell/1,tell/2,telling/1,told/0,get/1,get0/1,see/1,seeing/1,
  51.         seen/0,_]),
  52.     $define_mod($bio,[$writename/1,$writeqname/1,$put/1,$nl/0,$tab/1,
  53.         $tell/1,$tell/2,$telling/1,$told/0,$get/1,$get0/1,$see/1,
  54.         $seeing/1,$seen/0,$write4/1]).
  55.  
  56. $prorc_io :-
  57.     $define_mod($io,[write/1,writeq/1,display/1,print/1,print_al/2,
  58.             print_ar/2,errmsg/1]),
  59.     $define_mod($io,[$write/1,$writeq/1,$display/1,$print/1,
  60.             $print_al/2,$print_ar/2,$errmsg/1]).
  61.  
  62. $prorc_assert :-
  63.     $define_mod($assert,[assert/1,asserta/1,asserta/2,assertz/1,assertz/2,
  64.         assert/2,asserti/2,assert/4,assert_union/2, $assert_call_s/1,
  65.         $assert_get_prref/2,$assert_put_prref/2,$assert_abolish_i/1]),
  66.     $define_mod($assert,[$assert/1,$asserta/1,$asserta/2,$assertz/1,$assertz/2,
  67.         $assert/2,$asserti/2,$assert/4,$assert_union/2,$assert_call_s/1,
  68.         $assert_get_prref/2,$assert_put_prref/2,$assert_abolish_i/1]).
  69.  
  70. $prorc_bmeta :-
  71.     $define_mod($bmeta,[atom/1,atomic/1,integer/1,number/1,
  72.        structure/1,functor0/2,bldstr/3,arg/3,arity/2,real/1,
  73.        float/1, _,is_buffer/1]),
  74.     $define_mod($bmeta,[$atom/1,$atomic/1,$integer/1,$number/1,
  75.        $structure/1,$functor0/2,$bldstr/3,$arg/3,$arity/2,$real/1,
  76.        $float/1,$mkstr/3, $is_buffer/1]).
  77.  
  78. $prorc_meta :-
  79.     $define_mod($meta,[functor/3,'=..'/2,length/2]),
  80.     $define_mod($meta,[$functor/3,$univ/2,$length/2]).
  81.  
  82. $prorc_name :-
  83.     $define_mod($name,[name/2,name0/2]),
  84.     $define_mod($name,[$name/2,$name0/2]).
  85.  
  86. $prorc_read :-
  87.     $define_mod($read,[read/1,read/2]),
  88.     $define_mod($read,[$read/1,$read/2]).
  89.  
  90. $prorc_inlines :-
  91.     $define_mod($inlines,['='/2,'<'/2,'=<'/2,'>='/2,'>'/2,'=:='/2,
  92.     '=\='/2,is/2,eval/2,'_$savecp'/1,'_$cutto'/1,var/1,nonvar/1,
  93.     fail/0,true/0,halt/0,'?='/2,'\='/2]).
  94.  
  95. $prorc_osys :-
  96.     $define_mod($osys,[cputime/1,syscall/3,$system/2,system/1]),
  97.     $define_mod($osys,[$cputime/1,$syscall/3,$system/2,$system/1]).
  98.  
  99. $prorc_glob :-
  100.     $define_mod($glob,[globalset/1,gennum/1,gensym/2]),
  101.     $define_mod($glob,[$globalset/1,$gennum/1,$gensym/2]).
  102.  
  103. $prorc_compare :-
  104.     $define_mod($compare,['=='/2,'\=='/2,'@=<'/2,'@<'/2,'@>'/2,'@>='/2,
  105.         compare/3]),
  106.     $define_mod($compare,['$=='/2,_,_,_,_,_,$compare/3]).
  107.  
  108. $prorc_deb :-
  109.     $define_mod($deb,[debug/0,nodebug/0,trace/1,untrace/1,
  110.         (spy)/1,(nospy)/1,trace/0,untrace/0,debugging/0,tracepreds/1,spypreds/1]),
  111.     $define_mod($deb,[$debug/0,$nodebug/0,$trace/1,$untrace/1,
  112.         ($spy)/1,($nospy)/1,$trace/0,$untrace/0,$debugging/0,$deb_tracepreds/1,$deb_spypreds/1]).
  113.  
  114. $prorc_retr :-
  115.     $define_mod($retr,[retract/1,abolish/1,abolish/2,$update/2,
  116.         $retractall/1]),
  117.     $define_mod($retr,[$retract/1,$abolish/1,abolish/2,_,retractall/1]).
  118.  
  119. $prorc_consult :-
  120.     $define_mod($consult,[consult/1,consult/2,consult/3,_]),
  121.     $define_mod($consult,[$consult/1,$consult/2,$consult/3,$consult_list/1]).
  122.  
  123. $prorc_buff :-
  124.     $define_mod($buff,[alloc_perm/2,alloc_heap/2,trimbuff/3,_,
  125.         symtype/2,
  126.         substring/6,subnumber/6,subdelim/6,conlength/2,
  127.         pred_undefined/1, hashval/3]),
  128.     $define_mod($buff,[$alloc_perm/2,$alloc_heap/2,$trimbuff/3,
  129.         $buff_code/4,$symtype/2,
  130.         $substring/6,$subnumber/6,$subdelim/6,$conlength/2,
  131.         $pred_undefined/1, $hashval/3]).
  132.  
  133. $prorc_defint :-
  134.     $define_mod($defint,[defint_call/4]),
  135.     $define_mod($defint,[$defint_call/4]).
  136.  
  137. $prorc_setof :-
  138.     $define_mod($setof,[setof/3,bagof/3,findall/3,sort/2,_]),
  139.     $define_mod($setof,[$setof/3,$bagof/3,$findall/3,$sort/2,$keysort/3]).
  140.  
  141. $prorc_db :-
  142.     $define_mod($db,[$db_new_prref/1,$db_assert_fact/5,
  143.         $db_assert_fact/7, $db_add_clref/5,
  144.         $db_call_prref/2,$db_call_prref_s/2,$db_call_prref_s/3,
  145.         $db_call_clref/2,$db_get_clauses/3,$db_kill_clause/1]).
  146.  
  147. $prorc_compile :-
  148.     $define_mod($compile,[compile/0,compile/1,compile/2,compile/3,
  149.         compile/4]),
  150.     $define_mod($compile,[$compile/0,$compile/1,$compile/2,$compile/3,
  151.         $compile/4]).
  152.  
  153. $prorc_mod :-
  154.     $define_mod($getclauses,[getclauses/2,getclauses/3,attach/2,expand_term/2]),
  155.     $define_mod($getclauses,[$getclauses/2,$getclauses/3,$attach/2,$expand_term/2]).
  156.  
  157. $prorc_prag :-
  158.     $define_mod($prag,[get_prag/2]),
  159.     $define_mod($prag,[$get_prag/2]).
  160.  
  161. $prorc_blist :-
  162.     $define_mod($blist,[$append/3,$member/2,$memberchk/2,$not_memberchk/2]),
  163.     $define_mod($blist,[_,_,$member1/2,$not_member1/2]).
  164.  
  165. $prorc_listutil1 :-
  166.     $define_mod($listutil1,[$reverse/2,$merge/3,$absmember/2,$absmerge/3,
  167.         $nthmember/3,$nthmember1/3,$member2/2,$closetail/1]).
  168.  
  169. $prorc_mac :-
  170.     $define_mod($mac,[$macexp/3]).
  171.  
  172. $prorc_et :-
  173.     $define_mod($et, [et/1,noet/1,et_star/1,et_points/1,
  174.         et_remove/1,et_answers/2,et_calls/2]).
  175. $prorc_arith :-
  176.     $define_mod($arith,[$floatc/3,$exp/2,$square/2,$sin/2,$floor/2]),
  177.     $define_mod($arith,[floatc/3,exp/2,square/2,sin/2,floor/2]).
  178.  
  179.  
  180. $prorc_prof :-
  181.     $define_mod($prof, [$count/1,$time/1,$nocount/1,$notime/1,
  182.         $profiling/0,$prof_reset/1, $prof_resetcount/1,
  183.         $prof_resettime/1,$profile/0,$noprofile/0,$timepreds/1,
  184.         $countpreds/1, $prof_stats/0, $prof_stats/1]),
  185.     $define_mod($prof, [count/1,time/1,nocount/1,notime/1,
  186.         profiling/0,prof_reset/1,resetcount/1,
  187.         resettime/1,profile/0,noprofile/0,timepreds/1,
  188.         countpreds/1,prof_stats/0, prof_stats/1]).
  189.  
  190. $prorc_stat :-
  191.     $define_mod($statistics,[$statistics/0,$statistics/2]),
  192.     $define_mod($statistics,[statistics/0,statistics/2]).
  193.  
  194. $prorc_dcg :-
  195.     $define_mod($dcg, [$dcg/2,$phrase/2,$phrase/3]),
  196.     $define_mod($dcg, [dcg/2,phrase/2,phrase/3]).
  197.  
  198. $prorc_portray :-
  199.     $define_mod($portray,[$portray_term/1,$portray_clause/1]),
  200.     $define_mod($portray,[portray_term/1,portray_clause/1]).
  201.  
  202. $prorc_decompile :-
  203.     $define_mod($decompile,[$clause/2,$clause/3,$listing/1,$instance/2,$listing/0]),
  204.     $define_mod($decompile,[clause/2,clause/3,listing/1,instance/2,listing/0]).
  205.  
  206. $prorc_record :-
  207.     $define_mod($record,[erase/1,recorda/3,recordz/3,recorded/3]),
  208.     $define_mod($record,[$erase/1,$recorda/3,$recordz/3,$recorded/3]).
  209.  
  210. $prorc_currsyms :-
  211.     $define_mod($currsym,[$current_predicate/2,$current_predicate/3,
  212.             $predicate_property/2,$predicate_property/3,$current_functor/2,
  213.             $current_functor/3,$current_atom/1,$current_atom/2]),
  214.     $define_mod($currsym,[current_predicate/2,$current_predicate/3,
  215.             predicate_property/2,$predicate_property/3,current_functor/2,
  216.             $current_functor/3,current_atom/1,$current_atom/2]).
  217.  
  218. $prorc_opcode :- $define_mod($opcode,[$opcode/2,$opcode/3,$instruction/2]).
  219.  
  220. $prorc_funrel :- $define_mod($funrel,[$fun_rel/2,$expand_body/2]).
  221.  
  222.